varying vec3 L, texCoord0;

void main()
{	
	vec3 Leye = normalize(vec3(gl_LightSource[0].position));

	vec3 N = gl_NormalMatrix * gl_Normal;
	vec3 T = gl_NormalMatrix * vec3(1, 0, 0);
	vec3 B = gl_NormalMatrix * vec3(0, 1, 0);

	L.x = dot(Leye, T);
	L.y = dot(Leye, B);
	L.z = dot(Leye, N);
		
	texCoord0 = gl_MultiTexCoord0.xyz;	
		
	gl_Position = ftransform();
}
